﻿@model IList<SpotsHub.RouteService.Data.Package>
@using Telerik.Web.Mvc;
@using Telerik.Web.Mvc.UI
<table class="adminContent">
    <tr>
        <td>
            @(Html.Telerik().Grid(Model)
                .Name("pending-packages")
                .Columns(columns =>
                {
                    columns.Bound(x => x.Id);
                    columns.Bound(x => x.Status);
                    columns.Bound(x => x.LastUpdate);
                    columns.Bound(x => x.PickUpLocation.Address.FormattedAddress);
                    columns.Bound(x => x.DeliveryLocation.Address.FormattedAddress);
                    columns.Bound(x => x.Warehouse.Address.FormattedAddress);
                })
                .DataBinding(dataBinding => dataBinding.Ajax().Select("PendingPackgesList", "Manage"))
                .EnableCustomBinding(true))
        </td>
    </tr>
</table>
